<?php

Yii::import('zii.widgets.CPortlet');

class AdminMenu extends CPortlet		//FIXME сделать кеш
{
	public $operations;
	
	public function init()
	{
		$this->title=(Yii::t('main','Admin Menu'));
		parent::init();
	}

	protected function renderContent()
	{
		$items=array(
			array('label'=>Yii::t('main', 'Users'), 'url'=>array('/admin/user/')),
			array('label'=>Yii::t('main', 'Report'), 'url'=>array('/admin/report/')),
			array('label'=>Yii::t('main', 'Services'), 'url'=>array('/admin/service/')),
			array('label'=>Yii::t('main', 'Payaccs'), 'url'=>array('/admin/payacc/')),
			array('label'=>Yii::t('main', 'Payments'), 'url'=>array('/admin/payment/')),
			array('label'=>Yii::t('main', 'Invoices'), 'url'=>array('/admin/invoice/')),
			array('label'=>Yii::t('main', 'Packets'), 'url'=>array('/admin/packet/')),
			array('label'=>Yii::t('main', 'Speeds'), 'url'=>array('/admin/speed/')),
			//array('label'=>Yii::t('main', 'Counters'), 'url'=>array('/admin/counter/')),
			array('label'=>Yii::t('main', 'Histories'), 'url'=>array('/admin/history/')),
			array('label'=>Yii::t('main', 'Admins'), 'url'=>array('/admin/admin/')),
			array('label'=>Yii::t('main', 'Settings'), 'url'=>array('/admin/setting/')),
			array('label'=>Yii::t('main', 'Logout'), 'url'=>array('/site/logout')),
		);
		
		$this->widget('MyMenu',array(
			'items'=>$items,
			'operations'=>$this->operations,
			'submenuHtmlOptions'=>array('class'=>'submenu'),
		));
		
		//$this->render('adminMenu',array('items'=>$items,'operations'=>$this->operations));
	}
}